import { createRouter, createWebHistory } from 'vue-router'
import AdminLayout from '@/views/AdminLayout.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: AdminLayout,
      children: [
        {
          path: '',
          redirect: '/dashboard'
        },
        {
          path: 'dashboard',
          name: 'Dashboard',
          component: () => import('@/views/Dashboard.vue')
        },
        {
          path: 'attractions',
          name: 'Attractions',
          component: () => import('@/views/AttractionManage.vue')
        },
        {
          path: 'foods',
          name: 'Foods',
          component: () => import('@/views/FoodManage.vue')
        },
        {
          path: 'routes',
          name: 'Routes',
          component: () => import('@/views/RouteManage.vue')
        },
        {
          path: 'activities',
          name: 'Activities',
          component: () => import('@/views/ActivityManage.vue')
        },
        {
          path: 'accommodations',
          name: 'Accommodations',
          component: () => import('@/views/AccommodationManage.vue')
        },
        {
          path: 'faqs',
          name: 'FAQs',
          component: () => import('@/views/FAQManage.vue')
        },
        {
          path: 'images',
          name: 'Images',
          component: () => import('@/views/ImageManage.vue')
        },
        {
          path: 'contact',
          name: 'ContactManage',
          component: () => import('@/views/ContactManage.vue')
        }
      ]
    }
  ]
})

export default router
